package acm;

public class a11 {
    public static void main(String[] args){
        int gw,sw,bw;
        for (int i=100;i<1000;i++){
            gw=i%10;
            sw=i/10%10;
            bw=i/100;
            if ((gw*gw*gw)+(sw*sw*sw)+(bw*bw*bw)==i){
                System.out.println(i);
            }
        }
    }
}
